/**
 * 
 */
package messaage;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;

/**
 * @author Olga
 *
 */
public class EditedPostMsg extends Message {

	private boolean isFriend;
	private String forumID;
	private String postID;
	private String date;
	private String newContent;
        
	public EditedPostMsg(boolean isFriend, String forumID, String postID,
			String date, String newContent) {
		this.isFriend = isFriend;
		this.forumID = forumID;
		this.postID = postID;
		this.date = date;
		this.newContent = newContent;
		this.type = "EditedPostMsg";
	}

	@Override
	public String toString() {
		XStream xstream = new XStream(new DomDriver());
		String xml = xstream.toXML(this)+"\0";
		
		return xml;
	}


	/**
	 * @return the isFriend
	 */
	public boolean isFriend() {
		return isFriend;
	}

	/**
	 * @return the forumID
	 */
	public String getForumID() {
		return forumID;
	}

	/**
	 * @return the postID
	 */
	public String getPostID() {
		return postID;
	}

	/**
	 * @return the date
	 */
	public String getDate() {
		return date;
	}

	/**
	 * @return the newContent
	 */
	public String getNewContent() {
		return newContent;
	}
	
	

}
